//
//  EmotionKeyboard.m
//  JiaoX
//
//  Created by yinqy on 15/3/31.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import "EmotionKeyboard.h"
#import "EmotionListView.h"
#import "EmotionInfo.h"
#import "EmotionUtil.h"

@interface EmotionKeyboard()
/** 表情列表 */
@property (nonatomic, weak) EmotionListView *listView;
@property (nonatomic, strong) NSArray *emotions;

@end
@implementation EmotionKeyboard

+ (instancetype)keyboard
{
    return [[self alloc] init];
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // 1.添加表情列表
        EmotionListView *listView = [[EmotionListView alloc] init];
        [self addSubview:listView];
        self.listView = listView;
        [self setBackgroundColor:[UIColor whiteColor]];
        self.listView.emotions = [[EmotionUtil sharedInstance] getDefaultEmotion];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.listView.width = self.width;
    self.listView.height = self.height;
}


@end
